DEFINE_DIRECTFB_EXECUTABLE (dfbtest_blit.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_blit_multi.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_blit_threads.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_blit2.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_clipboard.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_fillrect.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_flip.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_font.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_init.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_input.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_layers.c directfb) 
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_mirror.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_prealloc.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_reinit.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_resize.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_scale.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_scale_nv21.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_stereo_window.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_surface_compositor.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_surface_compositor_threads.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_surface_updates.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_sync.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_video.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_waitserial.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_water.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_window.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_window_cursor.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_window_flip.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_window_flip_once.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_window_surface.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_window_update.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_windows_watcher.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (direct_stream.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (direct_test.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_alloc.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_layer.c directfb)
DEFINE_DIRECTFB_EXECUTABLE (dfbtest_stereo.c directfb)

if (ENABLE_ONE)
	DEFINE_DIRECTFB_EXECUTABLE (OneBench.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (OneTest.c directfb)
endif()


if (NOT ENABLE_PURE_VOODOO)
	DEFINE_DIRECTFB_EXECUTABLE (coretest_blit2.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (coretest_task.cpp directfb)
	DEFINE_DIRECTFB_EXECUTABLE (coretest_task_fillrect.cpp directfb)
	DEFINE_DIRECTFB_EXECUTABLE (fusion_call.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (fusion_call_bench.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (fusion_fork.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (fusion_reactor.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (fusion_skirmish.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (fusion_stream.c directfb)
endif()

if (ENABLE_VOODOO)
	DEFINE_DIRECTFB_EXECUTABLE (voodoo_bench.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (voodoo_bench_client.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (voodoo_bench_server.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (voodoo_bench_client_unix.c directfb)
	DEFINE_DIRECTFB_EXECUTABLE (voodoo_bench_server_unix.c directfb)

	DEFINE_DIRECTFB_EXECUTABLE (voodoo/voodoo_client.c voodoo)
	DEFINE_DIRECTFB_EXECUTABLE (voodoo/voodoo_server.c voodoo)
endif()

if (ENABLE_SAWMAN)
	include_directories ("${PROJECT_BINARY_DIR}/lib/sawman")
	include_directories ("${PROJECT_SOURCE_DIR}/lib/sawman")

	DEFINE_DIRECTFB_EXECUTABLE (sample1.c sawman)
	DEFINE_DIRECTFB_EXECUTABLE (testrun.c sawman)
	DEFINE_DIRECTFB_EXECUTABLE (testman.c sawman)
endif()

if (ENABLE_DIVINE)
	include_directories ("${PROJECT_BINARY_DIR}/lib/divine")
	include_directories ("${PROJECT_SOURCE_DIR}/lib/divine")

	DEFINE_DIRECTFB_EXECUTABLE (divine_test.c divine)
endif()

if (ENABLE_FUSIONDALE)
	include_directories ("${PROJECT_BINARY_DIR}/lib/fusiondale")
	include_directories ("${PROJECT_SOURCE_DIR}/lib/fusiondale")

	DEFINE_DIRECTFB_EXECUTABLE (fdtest_bench.c fusiondale)
	DEFINE_DIRECTFB_EXECUTABLE (fdtest_coma.c fusiondale)
	DEFINE_DIRECTFB_EXECUTABLE (fdtest_init.c fusiondale)
endif()

if (OPENGL_FOUND)
	include_directories ("${PROJECT_BINARY_DIR}/lib/egl")
	include_directories ("${PROJECT_SOURCE_DIR}/lib/egl")

	include_directories ("${PROJECT_SOURCE_DIR}/include/++dfb")
	include_directories ("${PROJECT_SOURCE_DIR}/examples/++dfb")

	SET (GL_EXAMPLES_LIBS ${OPENGL_gl_LIBRARY} directfb m)
	SET (EGL_EXAMPLES_LIBS ${OPENGL_gl_LIBRARY} EGL directfb m)
	DEFINE_DIRECTFB_EXECUTABLE (dfbtest_egl.c "${EGL_EXAMPLES_LIBS}")
	DEFINE_DIRECTFB_EXECUTABLE (dfbtest_gears.c "${EGL_EXAMPLES_LIBS}")
	DEFINE_DIRECTFB_EXECUTABLE (dfbtest_gl1.c "${GL_EXAMPLES_LIBS}")
	DEFINE_DIRECTFB_EXECUTABLE (dfbtest_gl2.c "${GL_EXAMPLES_LIBS}")
	DEFINE_DIRECTFB_EXECUTABLE (dfbtest_gl3.c "${GL_EXAMPLES_LIBS}")
	DEFINE_DIRECTFB_EXECUTABLE (dfbtest_old_gl2.c "${GL_EXAMPLES_LIBS}")

	add_executable (dfbtest_eglimage dfbtest_eglimage.cpp ../examples/++dfb/dfbapp.cpp)

	target_link_libraries (dfbtest_eglimage ${OPENGL_gl_LIBRARY} ++dfb EGL)

	install (TARGETS
		dfbtest_eglimage

		DESTINATION bin
	)
endif()
